<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title><%=obj.title%></title>
    <meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
    <link rel="stylesheet" href="https://cdn.bootcss.com/weui/1.1.3/style/weui.min.css">
    <link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.1/css/jquery-weui.min.css">
</head>
<body>
<div class="container">
    <h3 align="center" ><%=obj.title%></h3>
    <div class="info" >
        <% obj.infos.forEach(function(info){%>
        <p ><%=info %></p>
        <% }) %>
        <p>简介：<%=obj.desc%></p>
    </div>

    <div class="weui-cells">
        <% obj.chapters.forEach(function(chapter){%>
        <a class="weui-cell weui-cell_access" href="/kindle/chapter?url=<%=chapter.url%>">
            <div class="weui-cell__bd">
                <p><%=chapter.name%></p>
            </div>
            <div class="weui-cell__ft">
            </div>
        </a>
        <% }) %>

    </div>
    <h4>选择目录</h4>
    <div class="weui-cells">
        <div class="weui-cell weui-cell_select">
            <div class="weui-cell__bd">
                <select class="weui-select" name="select1" id="catalog">
                    <% obj.pages.forEach(function(item){%>
                    <option value="<%=item.url%>"><%=item.name%></option>
                    <% }) %>
                </select>
            </div>
        </div>
    </div>

</div>
</body>
<script src="https://cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/jquery-weui/1.2.1/js/jquery-weui.min.js"></script>
<script src="https://cdn.bootcss.com/fastclick/1.0.6/fastclick.min.js"></script>
<script>
    $(function () {
        FastClick.attach(document.body);
        $('#catalog').change(function () {
            location.href = '/kindle/novel?url='+$(this).val();
        })
    })
</script>
<style>
    .btn-center{
        margin: 10px auto;
        display: block;
    }
    .info{
        padding: 10px 10px;
        border-bottom: 1px solid;
        line-height: 1.4em;
    }

    .container{
        text-align: left;
        padding: 10px 0 55px;
        min-height: calc(100vh - 100px);
        overflow-y: scroll;
    }
</style>
</html>